﻿using Ext.Net;
using Ext.Net.Utilities;

namespace KamLib
{
    public interface IRecordFormContainer : IEquipContainer
    {
        FormPanel Form { get; }
    }

    public class RecordFormContainer : EquipContainer, IRecordFormContainer
    {
        public FormPanel Form { get; set; }
    }

    public class RecordFormLogicContainer : RecordFormContainer
    {
        public RecordFormLogicContainer(FormLogic logic) { Logic = logic; }
        public FormLogic Logic;
    }

    public static class RecordFormEquiper
    {
        public static void Apply(IRecordFormContainer c, bool creating)
        {
            //if (!creating) return;

            //var frm = c.Form;
            //frm.MonitorValid = true;
            //frm.Listeners.ClientValidation.Handler = "#{cmdApply}.setDisabled(!valid); #{cmdOK}.setDisabled(!valid);";
        }
    }




}